Skip to content

Conversation

azhogin
Copy link
Contributor

@azhogin azhogin commented Oct 5, 2025

'allocator_kind' and related queries converted to hooks to measure performance optimization.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 5, 2025
@Kobzol
Copy link
Member

Kobzol commented Oct 6, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 6, 2025
allocator_kind and related queries converted to hooks
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 6, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 6, 2025

☀️ Try build successful (CI)
Build commit: b26819f (b26819fc29ec19b685f8ba54ceac59c9d83e2039, parent: 828c2a9afccf3b3ff8133368cfbc8bfe526aaa4d)

@rust-timer

This comment has been minimized.

@azhogin
Copy link
Contributor Author

azhogin commented Oct 6, 2025

r? @petrochenkov

@azhogin
Copy link
Contributor Author

azhogin commented Oct 6, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 6, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b26819f): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 1

Max RSS (memory usage)

Results (primary -2.8%, secondary 1.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
2.6% [1.8%, 4.9%] 6
Improvements ✅
(primary)
-4.6% [-6.6%, -2.5%] 2
Improvements ✅
(secondary)
-1.2% [-1.6%, -0.7%] 2
All ❌✅ (primary) -2.8% [-6.6%, 0.9%] 3

Cycles

Results (primary 2.1%, secondary 2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
3.5% [2.3%, 5.6%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 469.991s -> 471.781s (0.38%)
Artifact size: 388.38 MiB -> 388.36 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 6, 2025
@petrochenkov
Copy link
Contributor

I don't think this PR does the optimization correctly.
When incremental compilation is enabled, the cstore accesses should still be queries, not hooks, otherwise we get untracked accesses to data that may change.

@petrochenkov
Copy link
Contributor

The current results are within noise, but let's re-measure the correct implementation just in case.
@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 6, 2025
@azhogin azhogin force-pushed the azhogin/alloc-query-opt-etc branch from c2d3b38 to 958571c Compare October 7, 2025 11:34
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/alloc-query-opt-etc branch from 958571c to f245c64 Compare October 7, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants